package com.mall.web.util;

import org.springframework.beans.factory.annotation.Autowired;

import com.mall.client.region.AreaService;
import com.mall.client.region.CityService;
import com.mall.client.region.ProvinceService;
import com.mall.common.util.bit.BitFlagUtil;
import com.mall.constant.MallConstant;
import com.mall.pojo.Area;
import com.mall.pojo.Mall;

public class MallUtil {

	
	
	
	/**
	 * 判断是否是智慧餐厅
	 * @param mall
	 * @return
	 */
	public static boolean zhihuiMall(Mall mall) {
		if (mall == null) {
			return false;
		}

		if (mall.getSsig() == null) {
			return false;
		}

		if (BitFlagUtil.checkSign(mall.getSsig(), MallConstant.BIT_FLAG_ZHIHUI)) {
			return true;
		}
		return false;
	}
	
	
	
	/**
	 * 获得省份名称
	 * @param provinceId
	 * @return
	 *//*
	public String getProvinceName(Integer provinceId){
		String provinceName = null;
		if(provinceId != null & provinceId > 0){
			provinceName = this.provinceService.getProvinceById(provinceId).getProvinceName();
		}
		return provinceName;
	}
	*//**
	 *  获得城市名称
	 * @param cityId
	 * @return
	 *//*
	public String getCityName(Integer cityId){
		String cityName = null;
		if(cityId != null & cityId > 0){
			cityName = this.cityService.getCityById(cityId).getCityName();
		}
		return cityName;
	}
	*//**
	 *  获得区域名称
	 * @param areaId
	 * @return
	 *//*
	public String getAreaName(Integer areaId){
		String areaName = null;
		if(areaId != null & areaId > 0){
			Area area = this.areaService.getAreaByAreaId(areaId);
			areaName = area.getAreaName();
		}
		return areaName;
	}
	*/
	
}
